Mixing Style Objects Inline

// App.js

import React from 'react';

const box = {
    color: "green",
    fontSize: '23px'
}

const shadow = {
    background: "orange",
    boxShadow: "1px 1px 1px 1px #cccd"
}

export default function App(){
    return (
      <div style={{...box, ...shadow}}>         <h1>Hello react</h1>
      </div>
      <div style={{...box, color: 'blue'}}>         <h1>Hello react</h1>
      </div>
    )
}

Credits